package com.niknik.woody.core.room;

/**
 * User: yoda
 * Date: 15.02.11
 * Time: 13:06
 */
public class GameEx
    extends Exception {

  private Integer msgCode;
  private Boolean isFatal;

  private GameEx(Integer msgCode, Boolean isFatal) {
    super((String) null);
    this.msgCode = msgCode;
    this.isFatal = isFatal;
  }

  public static GameEx fatal(Integer msg) {
    return new GameEx(msg, true);
  }

  public static GameEx err(Integer msg) {
    return new GameEx(msg, false);
  }

  public boolean isFatal() {
    return isFatal;
  }

  public Integer getMsgCode() {
    return msgCode;
  }
}
